package com.jwork.progress.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

@Data
@TableName("repoAdmin")
@ApiModel(value = "RepoAdmin对象", description = "用户")
public class RepoAdminEntity extends Model<RepoAdminEntity> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("用户名")
    @TableField("admin_name")
    private String adminName;

    @ApiModelProperty("密码")
    @TableField("password")
    private String password;

    @ApiModelProperty("用户昵称")
    @TableField("nick_name")
    private String nickName;

    @ApiModelProperty("所属经销商（经销商子管理员用）")
    @TableField("dealer_id")
    private Integer dealerId;

    @ApiModelProperty("角色 1admin账户 2经销商 3经销商子管理员 4店铺 5会计")
    @TableField("role_id")
    private Integer roleId;

    @ApiModelProperty("登录ip")
    @TableField("login_ip")
    private String loginIp;

    @ApiModelProperty("启用状态 0否 1是")
    @TableField("status")
    private Integer status;


    @Override
    public Serializable pkVal() {
        return this.id;
    }

}
